import request from "@/utils/request"

export default {
    // 查询手机号（验证登陆和注册）
    checkLoginByTel(formData) {
        const req = request({
            method: 'post',
            url: '/user/checkLoginByTel',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 检测旧密码
    checkOldPass(formData) {
        const req = request({
            method: 'post',
            url: '/user/checkOldPass',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 修改密码
    updatePass(formData) {
        const req = request({
            method: 'post',
            url: '/user/updatePass',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 更新个人信息
    updateUser(formData) {
        const req = request({
            method: 'post',
            url: '/user/updateUser',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 获取所有学校
    getAllSchool(formData) {
        const req = request({
            method: 'post',
            url: '/user/getAllScholl',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 注册用户
    registerUser(formData){
        const req = request({
            method: 'post',
            url: '/user/registerUser',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 获取所有用户
    getAllUser(formData) {
        const req = request({
            method: 'post',
            url: '/user/getAllUser',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 删除用户
    deleteUser(formData) {
        const req = request({
            method: 'post',
            url: '/user/deleteUser',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
}